package com.nulldev.util.io.FastIO;

import com.nulldev.util.JVM.Arguments;

public enum ExecutionMode {

	GLOBAL_EXECUTOR,
	DEDICATED_THREAD,
	DEDICATED_THREAD_POOL

	;

	private final static boolean USE_GLOBAL_EXECUTOR = Arguments.hasArgument("--FastIO.useGlobalExecutor");
	private final static boolean USE_SINGLE_THREAD = Arguments.hasArgument("--FastIO.useGlobalExecutor");

	static ExecutionMode getEM() {
		if (USE_GLOBAL_EXECUTOR) {
			return ExecutionMode.GLOBAL_EXECUTOR;
		} else if (USE_SINGLE_THREAD) {
			return ExecutionMode.DEDICATED_THREAD;
		} else
			return ExecutionMode.DEDICATED_THREAD_POOL;
	}
}
